Developer's Guide





Variables used:

K - getKey variable
W - While loops
T - Keeps track of the character position
L - Keeps track of map segments going up and down
M - Keeps track of map segments going left and right
L6 - list stored when map is stored to Str8
L6(1 - Width of the map
L6(2 - Height of the map
L6(3 - set to 1 if the map can go up or down
L6(4 - When character is coming from the left, set the value to where the character should show up in the new map on the right
L6(5 - When character is coming from the right, set the value to where the character should show up in the new map on the left
L6(6 - When character is coming from the top, set the value to where the character should show up in the new map on the bottom
L6(7 - When character is coming from the bottom, set the value to where the character should show up in the new map on the top
L6(8 - Set to 1 if the map can go left
L6(9 - Set to 1 if the map can go right



The screen:

The screen uses an 8x10 area of the 8x16 screen. This helps keep some of the speed up when moving the character. You can change how much is shows by changing the values of the 8 Output( commands. Also keep in mind, that if you expand the screen by 1 column on each side of the screen, you have to make your map 1 column bigger to each side to account for the change.




The map:

The maps that you develop for your project can be any size, but it is recommended to keep the map sizes down below 1500 bytes. The reason for this is that when the character is moving around near the end of the string, there will be considerable slow down. Nothing can be done about this, I'm afraid. Just make sure to keep them roughly at 1000 characters in length, and you should not see terrible lag.

Important notes on the map... You should be aware of a few things. When you set the list to check if the character can go up or down, you need to make sure you add 7 to the height of the map in the list element. This is because there is a routine that automatically adds 7 rows times the amount of columns to give space to the top and bottom of the map so it does not give an error when the displayer tries to display something that isn't there. On the sides, however, you need to hardcode the spaces into the string. Remember to give 4 to the left, and 5 to the right side. This will actually keep it so when you move to the side, you won't see the other side of the map, since the string will wrap. ;)

If none of this is making sense to you, then stop where you are, don't read any further, and post your questions on my forum. http://tifreakware.ath.cx



The programs:

You will want to create a program that is your intro. ZGA2 is simply standing for ZGAME2, which is the prog name I give all my projects for a primary gaming engine. Anyways, you will need to have your variables set up in this intro program, and have it link to ZGA2.

ZMA2 is where the map data is stored for this program. I don't recommend going above 6k per program for map storage. I know you are wondering where you will put more maps. That is easy. You need a program to determine which values L and M are at, and then go to the appropriate map storage program.

ZMA3 is where it checks to see if it needs to add the 7 empty strings, etc. This really could be changed to another program name, but for this demo, it is fine.




Making sense of this system:

Using the T variable, you manipulate where the character is in the string, which, using a series of sub( commands, gives the illusion of scrolling backgrounds. 


As long as you stick to the set up that is presented in ZGA2, and do not drastically change the movement code, you should be fine. There are 4 maps from Pokemon Purple that you can use to see this system in action. Also, it is recommended to get large sheets of graph paper, so you can draw out your maps, get your dimensions, etc. Makes things easier that way.

Also, the line Output(1,1,L6(1)fpart(T/L6(1 can be removed with in the display block, after you finish testing your maps. This there to check out your map, and make sure the columns match from calc to paper.